//
//  Path.h
//  ProjectL
//
//  Created by Nguyen Tan Loc on 8/16/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "CCSprite.h"
#import "PNode.h"
#import "PLine.h"
#import "DynamicObjectInterface.h"
#import "PSmallLight.h"
#import "PNodeIndicator.h"
#import "CCBlade.h"

typedef enum
{
    eJS_JAIL = 0,
    eJS_JAIL_BREAKING,
    eJS_JAIL_BREAKED,
} JAIL_STATE;


@interface Path : CCNode <DynamicObjectInterface>
{
    JAIL_STATE mJailState;
    
    float mSpreadTime;
    CGPoint mVirusPos;
    
    CCSprite *mDotCircle;
    CCBlade *mUserBlade;
    PNode *mUserNode;
    PLine *mUserLine;
    PNodeIndicator *mNodeIndicator;
    CCSprite *mVirus;
    
    NSMutableArray *mListPNode;
    NSMutableArray *mListPLine;
    NSMutableArray *mListLight;
    
    CCSpriteBatchNode *mBatchNode;
    CGPoint mGravity;
    
    CCLabelBMFont *mHint;
    CCLabelBMFont *mVirusSleeping;
}

@property (nonatomic, readonly) JAIL_STATE _jailState;

-(void) updateUserNode:(ccTime)delta;
-(id) initWithList:(NSArray *)listNodeInfo;
-(PNode *) getFirstNode;
-(PNode *) getUserNode;
-(CCBlade *) getUserBlade;
-(PLine *) getUserLine;
-(void) processTouch:(UITouchPhase)touchPhase position:(CGPoint)position;
-(void) connectWithNode:(PNode *)node;
-(void) setSpreadTime:(float)spreadTime;
-(void) startAction;
-(void) startSpread;
-(void) hideUserStuff;
-(void) setGravity:(CGPoint)pt;
-(void) addToBatch:(CCSpriteBatchNode *)batch;
-(void) jailBreak;
-(void) showCountOnUserNode;
-(CGRect) getDotCirleRect;
-(void) setVirusPos:(CGPoint)pos;

@end
